package com.blb.community_admin.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class ZyOwnerRoom {
  @TableId
  @JsonSerialize(using = ToStringSerializer.class)
  @ExcelProperty("业主房屋id")
  private long ownerRoomId;
  @ExcelProperty("小区ID")
  private long communityId;
  @ExcelProperty("楼栋ID")
  private long buildingId;
  @ExcelProperty("单元ID")
  private long unitId;
  @ExcelProperty("房屋ID")
  private long roomId;
  @ExcelProperty("业主ID")
  private long ownerId;
  @ExcelProperty("业主类型")
  private String ownerType;
  @ExcelProperty("房屋状态")
  private String roomStatus;
  @ExcelIgnore
  private String createBy;
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ExcelIgnore
  private LocalDateTime createTime;
  @ExcelIgnore
  private String updateBy;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @ExcelIgnore
  private LocalDateTime updateTime;

  @ExcelProperty("备注")
  private String remark;

  @TableField(exist = false)
  @ExcelIgnore
  private ZyCommunity zyCommunity;

  @TableField(exist = false)
  @ExcelIgnore
  private ZyBuilding zyBuilding;

  @TableField(exist = false)
  @ExcelIgnore
  private ZyUnit zyUnit;

  @TableField(exist = false)
  @ExcelIgnore
  private ZyRoom zyRoom;

  @TableField(exist = false)
  @ExcelIgnore
  private ZyOwner zyOwner;

  @TableField(exist = false)
  @ExcelIgnore
  private SysDictData sysDictData;
}
